package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchTimeIntervalCurveMapper;
import com.ruoyi.system.domain.DispatchTimeIntervalCurve;
import com.ruoyi.system.service.IDispatchTimeIntervalCurveService;

/**
 * 多时段曲线分析Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchTimeIntervalCurveServiceImpl implements IDispatchTimeIntervalCurveService 
{
    @Autowired
    private DispatchTimeIntervalCurveMapper dispatchTimeIntervalCurveMapper;

    /**
     * 查询多时段曲线分析
     * 
     * @param timeIntervalCurveId 多时段曲线分析主键
     * @return 多时段曲线分析
     */
    @Override
    public DispatchTimeIntervalCurve selectDispatchTimeIntervalCurveByTimeIntervalCurveId(Long timeIntervalCurveId)
    {
        return dispatchTimeIntervalCurveMapper.selectDispatchTimeIntervalCurveByTimeIntervalCurveId(timeIntervalCurveId);
    }

    /**
     * 查询多时段曲线分析列表
     * 
     * @param dispatchTimeIntervalCurve 多时段曲线分析
     * @return 多时段曲线分析
     */
    @Override
    public List<DispatchTimeIntervalCurve> selectDispatchTimeIntervalCurveList(DispatchTimeIntervalCurve dispatchTimeIntervalCurve)
    {
        return dispatchTimeIntervalCurveMapper.selectDispatchTimeIntervalCurveList(dispatchTimeIntervalCurve);
    }

    /**
     * 新增多时段曲线分析
     * 
     * @param dispatchTimeIntervalCurve 多时段曲线分析
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchTimeIntervalCurve(DispatchTimeIntervalCurve dispatchTimeIntervalCurve)
    {
        return dispatchTimeIntervalCurveMapper.insertDispatchTimeIntervalCurve(dispatchTimeIntervalCurve);
    }

    /**
     * 修改多时段曲线分析
     * 
     * @param dispatchTimeIntervalCurve 多时段曲线分析
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchTimeIntervalCurve(DispatchTimeIntervalCurve dispatchTimeIntervalCurve)
    {
        return dispatchTimeIntervalCurveMapper.updateDispatchTimeIntervalCurve(dispatchTimeIntervalCurve);
    }

    /**
     * 批量删除多时段曲线分析
     * 
     * @param timeIntervalCurveIds 需要删除的多时段曲线分析主键
     * @return 结果
     */
    @Override
    public int deleteDispatchTimeIntervalCurveByTimeIntervalCurveIds(Long[] timeIntervalCurveIds)
    {
        return dispatchTimeIntervalCurveMapper.deleteDispatchTimeIntervalCurveByTimeIntervalCurveIds(timeIntervalCurveIds);
    }

    /**
     * 删除多时段曲线分析信息
     * 
     * @param timeIntervalCurveId 多时段曲线分析主键
     * @return 结果
     */
    @Override
    public int deleteDispatchTimeIntervalCurveByTimeIntervalCurveId(Long timeIntervalCurveId)
    {
        return dispatchTimeIntervalCurveMapper.deleteDispatchTimeIntervalCurveByTimeIntervalCurveId(timeIntervalCurveId);
    }
}
